<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无限分类</title>
<script language="javascript" src="Script/CheckForm.js"></script>
<script language="javascript" src="Resource/Script/jquery.js"></script>
<script language="javascript" src="Resource/Script/TmisMenu.js"></script>
<script language="javascript" src="Resource/Script/Common.js"></script>
<link href="Resource/Css/Edit.css" type="text/css" rel="stylesheet">
{literal}
<script language="javascript" type="text/javascript">
var parentId=0;
//默认父节点
$(function(){
    parentId=document.getElementById('default').value;
})

function popMenu(e) {
    tMenu(e,'Index.php?controller=JiChu_Ware&action=tmismenu',parentId,true,function(json) {
        var arr = explode("||",json.text);
        document.getElementById('parentName').innerHTML=arr[0]?arr[0]:'';           
    });
}

function warning(){
    var wareName=document.getElementById('wareName').value;
    var guige=document.getElementById('guige').value;
    if(wareName==''){
        document.getElementById('warning').innerHTML='品名不能为空!'; return false;
    }
    else{
        var url='index.php?Controller=JiChu_Ware&action=getflag&wareName='+wareName+'&guige='+guige;
        url=encodeURI(url);
        //alert(url);return false;
        $.getJSON(url,null,function(json){
                //dump(json);
                //alert(json.flag); return false;
                if(json.flag=='true'){
                    document.getElementById('warning').innerHTML='允许录入!'; return false;
                }
                else{
                    document.getElementById('warning').innerHTML='纱支已存在!'; return false;
                }
            }
        );
    }
}
</script>
{/literal}
</head>
<body>

<form name="form1" id="form1" action="{url controller=$smarty.get.controller action='SaveDanjia'}" method="post">
<fieldset>     
<legend>纱支产量单价编辑</legend>
<div align="center">
<table>
<tr>
  <td>品名：</td>
  <td>{$aRow.wareName}</td>
  <td>规格：</td>
  <td>{$aRow.guige}</td></tr>
<tr>
  <td>松筒单价：</td>
  <td><input name="danjiaSt" type="text" id="danjiaSt" value="{$aRow.danjiaSt}"></td>
  <td>装出笼单价：</td>
  <td><input name="danjiaZcl" type="text" id="danjiaZcl" value="{$aRow.danjiaZcl}"></td>
</tr>
<tr>
  <td>烘纱单价：</td>
  <td><input name="danjiaHs" type="text" id="danjiaHs" value="{$aRow.danjiaHs}"></td>
  <td>回倒单价：</td>
  <td><input name="danjiaHd" type="text" id="danjiaHd" value="{$aRow.danjiaHd}"></td>
</tr>
<tr>
  <td>打包单价：</td>
  <td><input name="danjiaDb" type="text" id="danjiaDb" value="{$aRow.danjiaDb}"></td>
 <!--  <td>染色单价：</td>
  <td><input name="danjiaRs" type="text" id="danjiaRs" value="{$aRow.danjiaRs}"></td> -->
</tr>
<tr>
<td colspan="4" align="center"><input type="submit" name="Submit" value="提交">
  <input name="id" type="hidden" id="id" value="{$aRow.id}">
  <input name="wareId" type="hidden" id="id" value="{$aRow.wareId}">
  <input name="default" type="hidden" id="default" value="{$smarty.get.default}"></td>
</tr>
</table>
</div>
</fieldset>
</form>
</body>
</html>